package Window;

import XML.DeleteXMLDataDemo;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class remove extends JFrame{
    public remove(){
        setSize(300,290);
        setVisible(true);
        JLabel h=new JLabel("结点");

        JTextField i=new JTextField(15);


        JButton g=new JButton("确定");

        Container mk=getContentPane();

        mk.add(g);
        mk.add(h);
        mk.add(i);

        setBounds(300,300,300,290);//设置窗体的长宽各为300、300  让其显示在左上方的300、300处
        mk.setLayout(null);

        g.setBounds(110,180,60,30);
        h.setBounds(10,20,50,18);
        i.setBounds(60,20,200,18);




        g.addActionListener(new ActionListener(){//对注册按钮添加监听事件
            @SuppressWarnings("deprecation")
            @Override
            public void actionPerformed(ActionEvent arg0) {
                // TODO Auto-generated method stub
                if (i.getText().trim().equals("0")){
                    int k=0;
                    DeleteXMLDataDemo.move(k);
                }
                if (i.getText().trim().equals("1")){
                    int k=1;
                    DeleteXMLDataDemo.move(k);
                }
                if (i.getText().trim().equals("2")){
                    int k=2;
                    DeleteXMLDataDemo.move(k);
                }
                if (i.getText().trim().equals("3")){
                    int k=3;
                    DeleteXMLDataDemo.move(k);
                }
                if (i.getText().trim().equals("4")){
                    int k=4;
                    DeleteXMLDataDemo.move(k);
                }
                if (i.getText().trim().equals("5")){
                    int k=5;
                    DeleteXMLDataDemo.move(k);
                }
                if (i.getText().trim().equals("6")){
                    int k=6;
                    DeleteXMLDataDemo.move(k);
                }
                if (i.getText().trim().equals("7")){
                    int k=7;
                    DeleteXMLDataDemo.move(k);
                }
                if (i.getText().trim().equals("8")){
                    int k=8;
                    DeleteXMLDataDemo.move(k);
                }


            }

        });
    }
}
